﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SWDataDB.BLL;
using SWDataDB.DAL;
using SWDataDB.Models;
using System.Data;
using System.Drawing;

public partial class BIGIMG : System.Web.UI.Page
{
    public string zkid,fid;
    public string OGC_DEPART, OPEOJ_NAME, OMINE_NAME, OPEOJ_CODE, OADMIN_REGION, OSHEET_NAME, OHX_PEOPLE, ZKCODE, ZKFILEID, ZKHC;//,ZKPSNUM;

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            zkid = Request["zkid"];
            fid = Request["fid"];
            bind();
        }

    }
    private void bind()
    {

        //public DataSet GetPicNameWithSet(string zl_file_id,string zk_code,int hc)
        ZKImageInfo ZKIMG = new ZKImageInfo();
        DataSet ZKImgDS = ZKIMG.GetInfoByID(Convert.ToInt32(zkid));
        DataTable zkimgdt = ZKImgDS.Tables[0];
        DataView zkimgdv = zkimgdt.DefaultView;
        repeater_ZKImg.DataSource = zkimgdv;
        repeater_ZKImg.DataBind();




        YXInfo zkquery = new YXInfo();
       
        DataSet ds = zkquery.GetInfoByID(Convert.ToInt32(zkid));//根据zkcd在YX_TBL查找对应记录，因为
        DataTable dt = ds.Tables[0];
       
        ZKFILEID = dt.Rows[0]["ZL_FILE_ID"].ToString().Length == 0 ? null : dt.Rows[0]["ZL_FILE_ID"].ToString();//ZL_FILE_ID 在YX_TBL中
        ZKCODE = dt.Rows[0]["ZK_CODE"].ToString().Length == 0 ? null : dt.Rows[0]["ZK_CODE"].ToString();//ZL_FILE_ID 在YX_TBL中
        DataView dv = dt.DefaultView;
      
        dl_FileList.DataSource = dv;
        dl_FileList.DataBind();

        //从著录表中获取对应的ZL_FILE_ID的信息

        ZLInfo ZLFILEIDQuery = new ZLInfo();

        ZL_TBL ZLTBL = ZLFILEIDQuery.SelectZLInfoByID(ZKFILEID);
        OGC_DEPART = ZLTBL.O_GC_DEPART;        //馆藏机构: 	GC_DEPART
        OPEOJ_NAME = ZLTBL.O_PEOJ_NAME;        //项目名称: 	PEOJ_NAME
        OMINE_NAME = ZLTBL.O_MINE_NAME;        //矿区名称: 	MINE_NAME
        OPEOJ_CODE = ZLTBL.O_PEOJ_CODE;        //项目编号: 	PEOJ_CODE
        OADMIN_REGION = ZLTBL.O_ADMIN_REGION;        //行政区:ADMIN_REGION
        OSHEET_NAME = ZLTBL.O_SHEET_NAME;        //图幅名称: SHEET_NAME
        OHX_PEOPLE = ZLTBL.O_HX_PEOPLE;        //汇交人

    }
   
}